From: Florian Müllner Date: Thu, 5 Sep 2013 15:59:41 +0000 (+0200) Subject: iconGrid: Initialize properties in _init X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3503 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=39c4fa1bf0257d143afdf2dd9233a90dcd06312a;p=gnome-shell.git iconGrid: Initialize properties in _init While this is good style anyway, after the latest appDisplay changes the first call to get_preferred_height() happens before we properly compute those properties, resulting in a size request of NaN that triggers a Clutter warning. --- diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index 3715044eb..8bcb56d2c 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -533,6 +533,9 @@ const PaginatedIconGrid = new Lang.Class({ _init: function(params) { this.parent(params); this._nPages = 0; + this._rowsPerPage = 0; + this._spaceBetweenPages = 0; + this._childrenPerPage = 0; }, _getPreferredHeight: function (grid, forWidth, alloc) {